'use strict';
exports.main = async (event, context) => {
	//event为客户端上传的参数
	console.log('event : ', event)
	const db = uniCloud.database();
	// 获取 `user` 集合的引用
	const collection = await db.collection('users').add({username: event.username});
	console.log(collection)
	return {
		success: Boolean(collection),
		data: {
			...collection
		}
	}
};
